import { action, observable } from 'mobx'
import {getRankDropList,Detail,filterDetail} from '../../server/home'
class myDetail{
  //列表名称 手机名....
  @observable
  rankDataLis = []

  //过滤列表名称 手机名....
  @observable
  rankDataList = []
  
  //京东自营 手机续航
  @observable
  rankDropList = []

  //下拉菜单
  @observable
  rankdrop = []


  
  @action
  async myDetail(str) {
    let arr = await Detail(str)
    this.rankDataLis = arr.data.rankDataList
  }
  @action
  async filterDetail(str,str1) {
    let crr = await filterDetail(str,str1)
    this.rankDataLis = crr.data.rankDataList
  }

  @action
  async everyList(str) {
    let brr = await getRankDropList(str)
    //京东自营 手机续航
    this.rankDropList = brr.data.rankItemGroup
    //下拉菜单
    this.rankdrop = brr.data.dropList
  }
}
export default myDetail